package com.jrx.anytxn.investor.dto.loan;

import com.jrx.anytxn.common.constant.RegexConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 联合贷放款失败取消订单请求实体
 *
 * @author liuyang
 * @date 2020-06-10
 */
@ApiModel(value = "InvestorCancelLoanReq对象", description = "联合贷放款失败取消订单请求实体")
public class InvestorCancelLoanReq implements Serializable {

    @ApiModelProperty(value = "客户订单id",required = true)
    @Size(max=32, message = "客户订单id不能超过32位")
    @NotEmpty(message = "客户订单id不可空")
    private String loanId;

    @ApiModelProperty(value = "客户id",required = true)
    @Size(max=16, message = "客户id不能超过16位")
    @NotEmpty(message = "客户id不可空")
    private String customerId;

    @ApiModelProperty(value = "租戶id",required = true)
    @Size(max=4, message = "租戶id不能超过4位")
    @NotEmpty(message = "租戶id不可空")
    private String tenantId;

    @ApiModelProperty(value = "流水号",required = true)
    @Size(max=32, message = "交易流水号必须小于32位")
    @Pattern(regexp = RegexConstant.ALL_CHARSET_AND_NUMBER, message = "流水号只能是英文字母和数字组成且不可为空")
    @NotEmpty(message = "流水号不可空")
    private String seqNo;

    @ApiModelProperty(value = "渠道",required = true)
    @Size(max=32, message = "渠道不能超过32位")
    @NotEmpty(message = "渠道不可空")
    private String channel;

    @ApiModelProperty(value = "资金源",required = true)
    @Size(max=6, message = "资金源不能超过6位")
    @NotEmpty(message = "资金源不可空")
    private String fundId;

    @ApiModelProperty(value = "产品码",required = true)
    @Size(max=32, message = "产品码不能超过32位")
    @NotEmpty(message = "产品码不可空")
    private String productId;

    public String getLoanId() {
        return loanId;
    }

    public void setLoanId(String loanId) {
        this.loanId = loanId;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getFundId() {
        return fundId;
    }

    public void setFundId(String fundId) {
        this.fundId = fundId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }
}
